package gcb.metalsys.dto.cop;

import gcb.metalsys.enums.OrderEnum;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @author ReMidDream
 * @date 2020/2/12 17:42
 **/
@Data
public class OrderDTO {

    private Long orderId;

    private String userTrueName;

    private String clientName;

    private Integer orderStatus;

    private LocalDateTime orderStartTime;

    private LocalDateTime orderUpdateTime;

    private BigDecimal orderTotalPrice;

    private String orderStatusName;

    public void statusConverse(){
        for (OrderEnum value : OrderEnum.values()) {
            if (value.getCode().equals(orderStatus)) {
                orderStatusName = value.getMessage();
            }
        }
    }

}
